using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
using Jaws.Core.Web.Data;
using Jaws.Core.Web.Entities.Pages;

namespace Jaws.Core.Web.Entities.Post
{
    [Serializable]
    [XmlRoot("posts")]
    [XmlDataDirectory("posts")]
    public class PostCollection : XmlCollectionBase<PostCollection, Post>
    {
        private static PostCollection post;

        internal PostCollection(IList<Post> list)
            : base(list)
        {
        }

        public PostCollection()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PageCollection"/> class.
        /// </summary>
        public static PostCollection Posts
        {
            get
            {
                if (post == null)
                {
                    post = Load();
                }
                return post;
            }
        }
        
    }
}